<!--
* description: 保修申请-提报-详情
* author: wangjuan
* createdDate:2020-11-12
-->
<template>
  <section class="editSetBelowAdd">
    <el-dialog
      v-dialogDrag
      :visible.sync="curPopupsVisible"
      :title="textMap"
      :append-to-body="true"
      width="70%"
      :close-on-click-modal="false"
      @close="closeEdit"
    >
      <dialogHeader
        slot="title"
        :title="textMap"
        :style-type="$store.state.app.dialogType"
      />

      <div class="filter-container filter-title">基本信息</div>
      <div class="filter-container filter-params">
        <el-row ref="vailComponentList1" :gutter="26">
          <component
            :is="comp.component"
            v-for="comp in tableComponents1.filter((o) => o.isMust === true)"
            :ref="comp.isRequire ? comp.isRequire + comp.compKey : comp.compKey"
            :key="comp.compKey"
            :validrule="comp.validrule"
            :code-field="comp.codeField"
            :text-field="comp.textField"
            :popups-key="comp.compKey"
            :parent-fileds="comp.parentFileds"
            :code="formField[comp.codeField]"
            :disabled="comp.disabled"
            :o-fields="comp.oFields"
            :options="comp.options"
            :custom-obj="comp.customObj"
            :is-require="comp.isRequire"
            :is-mul="comp.isMul"
            :span="comp.span || 8"
            :label-name="comp.labelName"
            :lookuptype="comp.lookuptype"
            :date-options-type="comp.dateOptionsType"
            @changeCode="getComponentCode"
            @focusCode="getFocusCode"
          />
        </el-row>
      </div>

      <div class="filter-container filter-title">客户车辆信息</div>
      <div class="filter-container filter-params">
        <el-row :gutter="26">
          <component
            :is="comp.component"
            v-for="comp in tableComponents2.filter((o) => o.isMust === true)"
            :ref="comp.isRequire ? comp.isRequire + comp.compKey : comp.compKey"
            :key="comp.compKey"
            :validrule="comp.validrule"
            :code-field="comp.codeField"
            :text-field="comp.textField"
            :popups-key="comp.compKey"
            :parent-fileds="comp.parentFileds"
            :code="formField[comp.codeField]"
            :text="formField[comp.textField]"
            :disabled="true"
            :o-fields="comp.oFields"
            :options="comp.options"
            :show-placeholder="comp.placeholder"
            :custom-obj="comp.customObj"
            :is-require="comp.isRequire"
            :is-mul="comp.isMul"
            :span="comp.span || 24"
            :label-name="comp.labelName"
            :lookuptype="comp.lookuptype"
            :data-to-object="comp.dataToObject"
            :date-options-type="comp.dateOptionsType"
            @changeCode="getComponentCode"
            @focusCode="getFocusCode"
          />
        </el-row>
      </div>

      <div class="filter-container filter-title">其他信息</div>
      <el-tabs v-model="activeName">
        <el-tab-pane label="故障信息" name="first">
          <div class="filter-container filter-params">
            <el-row ref="vailComponentList3" :gutter="26">
              <component
                :is="comp.component"
                v-for="comp in tableComponents3.filter((o) => o.isMust === true )"
                :ref="comp.isRequire ? comp.isRequire + comp.compKey : comp.compKey"
                :key="comp.compKey"
                :validrule="comp.validrule"
                :code-field="comp.codeField"
                :text-field="comp.textField"
                :popups-key="comp.compKey"
                :parent-fileds="comp.parentFileds"
                :code="formField[comp.codeField]"
                :disabled="true"
                :o-fields="comp.oFields"
                :options="comp.options"
                :custom-obj="comp.customObj"
                :is-require="comp.isRequire"
                :is-mul="comp.isMul"
                :span="comp.span || 8"
                :label-name="comp.labelName"
                :lookuptype="comp.lookuptype"
                :date-options-type="comp.dateOptionsType"
                @changeCode="getComponentCode"
                @focusCode="getFocusCode"
              />
            </el-row>
          </div>
        </el-tab-pane>

        <el-tab-pane label="附件信息" name="second">
          <one-table-template
            ref="multipleTable1"
            :dynamic-table-cols="tableCols1"
            :dynamic-form-fields="formField"
            :dynamic-is-init-table="true"
            :dynamic-is-show-select="false"
            :dynamic-is-show-more-btn="true"
            :dynamic-table-defult-height="200"
            :is-show-pagination="false"
          />
        </el-tab-pane>

        <!-- 索赔项目 -->
        <el-tab-pane label="索赔工时" name="third">
          <one-table-template
            ref="multipleTable2"
            :dynamic-table-cols="tableCols"
            :dynamic-form-fields="formField"
            :dynamic-is-init-table="true"
            :dynamic-is-show-select="false"
            :dynamic-is-show-more-btn="true"
            :dynamic-table-defult-height="200"
            :is-show-pagination="false"
          />
        </el-tab-pane>

        <!-- 索赔备件 -->
        <el-tab-pane label="索赔备件" name="fourth">
          <one-table-template
            ref="multipleTable3"
            :dynamic-table-cols="tableCols2"
            :dynamic-form-fields="formField"
            :dynamic-is-init-table="true"
            :dynamic-is-show-select="false"
            :dynamic-is-show-more-btn="true"
            :dynamic-table-defult-height="200"
            :is-show-pagination="false"
          />
        </el-tab-pane>

        <!-- 索赔其他项目 -->
        <el-tab-pane label="索赔其他项目" name="fiveth">
          <one-table-template
            ref="multipleTable4"
            :dynamic-table-cols="tableCols3"
            :dynamic-form-fields="formField"
            :dynamic-is-init-table="true"
            :dynamic-is-show-select="false"
            :dynamic-is-show-more-btn="true"
            :dynamic-table-defult-height="200"
            :is-show-pagination="false"
          />
        </el-tab-pane>
      </el-tabs>
    </el-dialog>
  </section>
</template>
<script>
import { oneTableWithViewTemplateMixins } from '@/components/mixins/oneTableWithViewTemplateMixins'
import { formMixins } from '@/components/mixins/formMixins'
import OneTableTemplate from '@/components/templates/oneTable'
import { vehiclePdiPriceInquirys } from '@/api/se/vehiclePdiPriceInquiry'
import Vue from 'vue'
export default {
  components: {
    dialogHeader: () => import('@/components/dialogHeader'),
    OneTableTemplate
  },
  // 组件混入对象：{data[listQuery] methods[queryTable]}
  mixins: [oneTableWithViewTemplateMixins, formMixins],

  // // 阻塞路由预加载网格中组件的数据
  beforeRouteEnter(to, from, next) {
    Vue.prototype.$ConfigCache.CacheConfig.initData([to.path, ''], function() {
      next()
    })
  },
  props: {
    dynamicEditRowData: {
      type: Object,
      default: () => {
        return {}
      }
    },
    // 弹出是否显示
    popupsVisible: { type: Boolean, default: false }
  },

  data() {
    // 页面标识（与上面beforeRouteEnter中的对应）
    const viewPageCode = this.$route.path
    // 绑定事件配置化事件
    this.$ConfigCache.CacheConfig.bindEvent(this, [viewPageCode])
    return {
      tableComponents: [],
      // 动态组件-查询条件
      tableComponents1:
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path] &&
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path]
          .tableComponents1 &&
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path]
          .tableComponents1.length > 0
          ? this.$ConfigCache.CacheConfig.cacheData[this.$route.path]
            .tableComponents1
          : [
            {
              compKey: 'compKey1',
              labelName: '申请单号：',
              codeField: 'preAuthorCode',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey2',
              labelName: '门店编码：',
              codeField: 'dlrCode',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey3',
              labelName: '门店名称：',
              codeField: 'dlrFullName',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey4',
              labelName: '状态：',
              codeField: 'sendStatus',
              component: () => import('@/components/org/commonSelect'),
              customObj: {
                api: vehiclePdiPriceInquirys.findClaimStutas,
                selectType: '1'
              },
              oFields: 'sendStatus,sendStatusName',
              isMul: false,
              disabled: true,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey5',
              labelName: '保修鉴定员：',
              codeField: 'sendMan',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey6',
              labelName: '联系电话：',
              codeField: 'sendManTel',
              component: () => import('@/components/org/commonInput'),
              validrule: { isPhone: true, maxlength: 11, noRequire: true },
              type: 'inputText',
              isRequire: true,
              isMul: false,
              isMust: true,
              disabled: true,
              span: 6
            },
            {
              compKey: 'compKey7',
              labelName: '索赔类别：',
              codeField: 'guranteeType',
              textField: 'guranteeTypeName',
              customObj: {
                api: vehiclePdiPriceInquirys.findGuranteeType,
                selectType: '1',
                defOptionFields: ['guranteeType', 'guranteeTypeName']
              },
              component: () => import('@/components/org/commonSelect'),
              type: 'dropdownList',
              isMust: true,
              disabled: true,
              span: 6
            },
            {
              compKey: 'compKey8',
              labelName: '预计工时费：',
              codeField: 'wiDueAmount',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey9',
              labelName: '预计备件费：',
              codeField: 'partDueFee',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey10',
              labelName: '其他费用：',
              codeField: 'sumOtherDueAmount',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey11',
              labelName: '合计金额：',
              codeField: 'feeTotal',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMust: true,
              span: 6
            }
          ],

      // 动态组件-查询条件

      tableComponents2:
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path] &&
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path]
          .tableComponents2 &&
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path]
          .tableComponents2.length > 0
          ? this.$ConfigCache.CacheConfig.cacheData[this.$route.path]
            .tableComponents2
          : [
            {
              compKey: 'compKey1',
              labelName: 'VIN码：',
              codeField: 'vin',
              component: () => import('@/components/se/VIN'),
              type: 'inputText',
              disabled: false,
              isMust: true,
              isMul: false,
              span: 6
            },
            {
              compKey: 'compKey2',
              labelName: '车牌号：',
              codeField: 'carLicense',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey3',
              labelName: '车型编码：',
              codeField: 'carConfigCode',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey4',
              labelName: '车型名称：',
              codeField: 'carConfigCN',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey5',
              labelName: '生产日期：',
              codeField: 'produceDate',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey6',
              labelName: '保修开始时间：',
              codeField: 'invoiceDate',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey7',
              labelName: '行驶里程：',
              codeField: 'mileage',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey8',
              labelName: '前电机号：',
              codeField: 'engineCode',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey9',
              labelName: '后电机号：',
              codeField: 'engineCode2',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey10',
              labelName: '变速器号：',
              codeField: 'ectCode',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey11',
              labelName: '增程器号：',
              codeField: 'boosterCode',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              disabled: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey12',
              labelName: '电池包编号：',
              codeField: 'batteryCode',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              isMul: false,
              isMust: true,
              disabled: true,
              span: 6
            },
            {
              compKey: 'compKey13',
              labelName: '购件日期：',
              codeField: 'payDate',
              component: () =>
                import('@/components/org/datePicker/datePicker.vue'),
              type: 'inputText',
              isMul: false,
              isMust: true,
              disabled: true,
              span: 6
            },
            {
              compKey: 'compKey14',
              labelName: '购件里程：',
              codeField: 'payMileage',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              isMul: false,
              isMust: true,
              disabled: true,
              span: 6
            },
            {
              compKey: 'compKey15',
              labelName: '车主姓名：',
              codeField: 'custName',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              isMul: false,
              isMust: true,
              disabled: true,
              span: 6
            },
            {
              compKey: 'compKey16',
              labelName: '车主电话：',
              codeField: 'phone',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              isMul: false,
              isMust: true,
              disabled: true,
              span: 6
            },
            {
              compKey: 'compKey17',
              labelName: '送修人：',
              codeField: 'repairMan',
              component: () => import('@/components/org/commonInput'),
              type: 'inputText',
              isRequire: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey18',
              labelName: '送修人电话：',
              codeField: 'repairTel',
              component: () => import('@/components/org/commonInput'),
              validrule: { isPhone: true, maxlength: 11 },
              type: 'inputText',
              isRequire: true,
              isMul: false,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey19',
              labelName: '车辆用途：',
              codeField: 'buycaruseCode',
              textField: 'buycaruseCodeName',
              customObj: {
                api: vehiclePdiPriceInquirys.findCarApplication,
                selectType: '1',
                defOptionFields: ['buycaruseCode', 'buycaruseCodeName']
              },
              component: () => import('@/components/org/commonSelect'),
              type: 'dropdownList',
              isMul: false,
              disabled: true,
              isMust: true,
              span: 6
            },
            {
              compKey: 'compKey20',
              labelName: '客户属性：',
              codeField: 'property',
              textField: 'propertyName',
              customObj: {
                api: vehiclePdiPriceInquirys.findSignatoryType,
                selectType: '1',
                defOptionFields: ['property', 'propertyName']
              },
              component: () => import('@/components/org/commonSelect'),
              type: 'dropdownList',
              isMul: false,
              disabled: true,
              isMust: true,
              span: 6
            }
          ],

      tableComponents3: [
        {
          compKey: 'compKey4',
          labelName: '故障类型：',
          codeField: 'custType',
          textField: 'custTypeName',
          customObj: {
            api: vehiclePdiPriceInquirys.findCustType,
            selectType: '1',
            defOptionFields: ['custType', 'custTypeName']
          },
          component: () => import('@/components/org/commonSelect'),
          isRequire: true,
          type: 'dropdownList',
          isMust: true,
          span: 6
        },
        {
          compKey: 'compKey5',
          labelName: '故障现象码：',
          codeField: 'csCode',
          textField: 'csCtName',
          customObj: {
            api: vehiclePdiPriceInquirys.findFaultPhenomenon,
            selectType: '1',
            defOptionFields: ['csCtCode', 'csCtName']
          },
          component: () => import('@/components/org/commonSelect'),
          type: 'inputText',
          isMul: false,
          isMust: true,
          span: 6
        },
        {
          compKey: 'compKey7',
          labelName: '故障部位：',
          codeField: 'faultPartCode',
          textField: 'faultPartName',
          customObj: {
            api: vehiclePdiPriceInquirys.findFaultPartName,
            selectType: '1',
            defOptionFields: ['faultPartCode', 'faultPartName']
          },
          component: () => import('@/components/org/commonSelect'),
          type: 'dropdownList',
          isMust: true,
          span: 6
        },
        {
          compKey: 'compKey10',
          labelName: '故障描述：',
          codeField: 'custComplainCS',
          component: () => import('@/components/org/commonInput/textareaInput'),
          type: 'inputText',
          isRequire: true,
          isMust: true,
          span: 24
        },
        {
          compKey: 'compKey11',
          labelName: '诊断过程：',
          codeField: 'detailCheckSynopsis',
          component: () => import('@/components/org/commonInput/textareaInput'),
          type: 'inputText',
          isRequire: true,
          isMust: true,
          span: 24
        },
        {
          compKey: 'compKey12',
          labelName: '故障处理：',
          codeField: 'repairWay',
          component: () => import('@/components/org/commonInput/textareaInput'),
          type: 'inputText',
          isRequire: true,
          isMust: true,
          span: 24
        }
      ],
      // 附件信息
      tableCols1: [
        {
          prop: 'controlBtn',
          label: '操作',
          width: 100,
          fixed: true,
          isComponent: true,
          comps: [
            {
              compKey: 'Key0',
              labelName: '下载',
              component: () => import('@/components/org/linkButton'),
              clickEvent: (index) => this.fileDownload(index)
            }
          ]
        },
        {
          prop: 'applyFilePathId',
          label: '附件ID',
          align: 'center',
          hidden: true
        },
        {
          prop: 'fileName',
          label: '附件名称',
          align: 'center'
        },
        {
          label: '附件路径',
          prop: 'attachmentFilePath',
          align: 'center'
        },
        {
          prop: 'fileRemark',
          label: '备注',
          align: 'center'
        }
      ],
      // 索赔工时
      tableCols: [
        {
          prop: 'releaseId',
          label: '主键ID',
          hidden: true,
          alwaysHidden: true
        },
        {
          prop: 'wiCode',
          label: '工时编码',
          align: 'center'
        },
        {
          prop: 'wiName',
          label: '维修内容',
          align: 'center'
        },
        {
          prop: 'wiQTY',
          label: '工时数',
          align: 'center'
        },
        {
          prop: 'wiPrice',
          label: '工时单价',
          align: 'center'
        },
        {
          prop: 'wiTotal',
          label: '费用合计',
          align: 'center'
        },
        {
          prop: 'workClaimWiCoef',
          label: '索赔系数',
          align: 'center'
        },
        {
          prop: 'isMain',
          label: '是否主工时',
          align: 'center'
        }
      ],

      // 索赔备件
      tableCols2: [
        {
          prop: 'partCode',
          label: '备件编码',
          align: 'center'
        },
        {
          prop: 'partName',
          label: '备件名称',
          align: 'center'
        },
        {
          prop: 'partQTY',
          label: '数量',
          align: 'center',
          isComponent: true,
          width: 170,
          comps: [
            {
              compKey: 'Key1',
              codeField: 'partQTY',
              component: () =>
                import('@/components/se/commonInput/numberInput'),
              isInput: true,
              disabled: true,
              align: 'center',
              dataToObject: {
                min: 0.1
              },
              change: (val, comType, row) => this.changeQty(val, comType, row),
              type: 'Number'
            }
          ]
        },
        {
          prop: 'partPrice',
          label: '单价',
          align: 'center'
        },
        {
          prop: 'partSum',
          label: '费用合计',
          align: 'center'
        },
        {
          prop: 'partClaimWiCoef',
          label: '索赔系数',
          align: 'center'
        },
        {
          prop: 'partIsMain',
          label: '是否主备件',
          align: 'center'
        }
      ],
      // 索赔其他项目
      tableCols3: [
        {
          prop: 'otherFeeNO',
          label: '其他项目',
          align: 'center',
          hidden: true
        },
        {
          prop: 'otherFeeName',
          label: '其他项目',
          align: 'center'
        },
        {
          prop: 'otherFee',
          label: '费用',
          align: 'center',
          isComponent: true,
          comps: [
            {
              compKey: 'Key2',
              codeField: 'otherFee',
              component: () =>
                import('@/components/se/commonInput/priceNumInput'),
              isInput: true,
              disabled: true,
              dataToObject: {
                min: 0
              },
              change: (val, comType, row) => this.changeCost(val, comType, row),
              type: 'Number'
            }
          ]
        },
        {
          prop: 'otherRemark',
          label: '备注',
          align: 'center'
        }
      ],

      // 表单数据
      formField: this.$utils.getFormField(this,
        {
          sendManId: '',
          preAuthorCode: '',
          dlrFullName: '',
          dlrCode: '',
          sendStatus: '',
          sendMan: '',
          sendManTel: '',
          guranteeType: '',
          wiDueAmount: 0.00,
          partDueFee: 0.00,
          sumOtherDueAmount: 0.00,
          feeTotal: 0.00,

          vin: '',
          vinCode: '',
          carConfigCode: '',
          carSeriesCN: '',
          carConfigCN: '',
          produceDate: '',
          invoiceDate: '',
          mileage: '',
          engineCode: '',
          engineCode2: '',
          ectCode: '',
          boosterCode: '',
          batteryCode: '',
          payDate: '',
          payMileage: '',
          custName: '',
          phone: '',
          repairMan: '',
          repairTel: '',
          buycaruseCode: '',
          property: '',
          repairOrderCode: '',

          carBrandCode: '',
          carLicense: '',
          carSeriesCode: '',
          custType: '', // 故障类型
          custTypeName: '',
          pfpCode: '', // 故障件代码
          pfpName: '', //  故障件名称
          csCode: '', //  故障现象码
          csCtName: '',
          faultPartCode: '', //  故障部位
          faultPartName: '',
          remark: '', //  备注
          custComplainCS: '', // 故障描述
          detailCheckSynopsis: '', //  诊断过程
          repairWay: '', //  故障处理
          fujianInfo: [],
          claimProject: [],
          claimPart: [],
          claimOtherPart: []
        },
        this.$ConfigCache.CacheConfig.cacheData[viewPageCode]
      ),

      // 标题
      textMap: '保修申请单详情',
      activeName: 'first' // tab栏默认项
    }
  },

  watch: {
    popupsVisible: {
      handler(newVal) {
        if (newVal) {
          this.$requestAPI({
            apiUrl: vehiclePdiPriceInquirys.findClaimDetails.APIUrl,
            variables: { preAuthorID: this.dynamicEditRowData.preAuthorID }
          }).then((response) => {
            const resDatas = response.rows[0]
            const attrs = ['vin', 'phone', 'guranteeType', 'custType', 'sendManTel',
              'csCode', 'faultPartCode', 'custComplainCS', 'detailCheckSynopsis', 'repairWay',
              'wiDueAmount', 'feeTotal', 'sumOtherDueAmount', 'partDueFee', 'repairMan',
              'repairTel', 'carLicense', 'carConfigCode', 'carConfigCN', 'produceDate',
              'invoiceDate', 'mileage', 'engineCode', 'engineCode2', 'ectCode',
              'boosterCode', 'batteryCode', 'payDate', 'payMileage', 'dlrCode',
              'dlrFullName', 'sendStatus', 'sendMan', 'sendManId'
            ]
            attrs.forEach(attr => {
              if (Object.prototype.hasOwnProperty.call(this.formField, attr)) {
                this.formField[attr] = resDatas[attr] === null ? '' : resDatas[attr]
              }
            })
            this.$refs['multipleTable1'].list = response.rows[0].fujianInfo
            this.$refs['multipleTable2'].list = response.rows[0].claimProject
            this.$refs['multipleTable3'].list = response.rows[0].claimPart
            this.$refs['multipleTable4'].list = response.rows[0].claimOtherPart
          })
        }
      }
    }
  },
  created() {
    this.tableComponents = [...this.tableComponents1, ...this.tableComponents2, ...this.tableComponents3]
  },
  methods: {
    // 附件下载
    fileDownload(index) {
      if (this.$refs['multipleTable1'].list[index].attachmentFilePath) {
        this.$utils.FileDownload([this.$refs['multipleTable1'].list[index].attachmentFilePath])
      }
    },

    // 关闭弹窗
    closeEdit() {
      this.$emit('closeviewData')
    }
  }
}
</script>

<style lang="scss" scoped>
.filter-title {
  font-size: 18px;
  font-weight: bolder;
}
.filter-container.filter-title::before {
  border-left: 4px solid #0075ff;
  padding-right: 10px;
  height: 20px;
  left: 0px;
  top: 4px;
}

.btns-container {
  width: 100%;
  height: 30px;
  padding: 0 20px;
  background-color: #fff;
  .el-button {
    float: right;
  }
}
.add {
  margin-right: 19px;
  margin-bottom: 15px;
}
.mainten-table__line {
  width: 100%;
  height: 30px;
  padding: 0 20px;
  line-height: 30px;
  background-color: #fff;
}
/deep/.el-input-number--small {
  width: 160px;
}
/deep/.el-input-number--small .el-input__inner {
  padding-right: 0;
}
/deep/.el-input-number .el-input__inner {
  padding-left: 0;
}
/deep/.el-table .el-input--small .el-input__inner {
  height: 26px;
}
</style>
